package ch4;

/**
 * Created by 竹韵澜 on 2017/7/16.
 */

//********************************************************************
//  Stars.java       Java Foundations
//
//  Demonstrates the use of nested for loops.
//********************************************************************

public class Stars {
    //-----------------------------------------------------------------
    //  Prints a triangle shape using asterisk (star) characters.
    //-----------------------------------------------------------------

    public static void main (String[] args)
    {
        final int MAX_ROWS = 10;

        for (int row = 1; row <= MAX_ROWS; row++)
        {
            for (int star = 1; star <= row; star++)
                System.out.print ("*");

            System.out.println();
        }
    }
}
